﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Xml;
using System.Xml.Serialization;

namespace Com.Charence.PassManager.BusinessEntities.Account
{
    [XmlRoot("SecQ")]
    public class SecureQuestionSet
    {
        [XmlElement("question")]
        public string SecureQuestion { get; set; }

        [XmlElement("answer")]
        public string SecureAnswer { get; set; }

        public virtual string ToXml()
        {
            var serializer = new XmlSerializer(typeof(SecureQuestionSet));
            var sb = new StringBuilder();
            using (var writer = XmlWriter.Create(sb))
            {
                serializer.Serialize(writer, this);
            }
            return sb.ToString();
        }
    }
}
